import java.util.Scanner;

/**
 * Created whit IntelliJ IDEA.
 * Description：
 * User：ZHONGCHEN
 * Date:2022-04-12
 * Time:17:10
 */
public class TestDemo {
    //806. 写字符串需要的行数
    public int[] numberOfLines(int[] widths, String s) {
        int[] ans = new int[2];
        int count = 0;
        for (char c : s.toCharArray()) {
            count += widths[c - 'a'];
            if (count > 100) {
                count = widths[c - 'a'];
                ans[0]++;
            }
        }
        ans[0]++;
        ans[1] = count;
        return ans;
    }

    static boolean[][] flag;
    static int ans = 0;

    //牛客 红与黑 BFS
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int row = scanner.nextInt();
            int col = scanner.nextInt();
            int m = 0, n = 0;
            ans = 0;
            // 利用boolean数组来记录走过的路以防重复
            flag = new boolean[row][col];
            char[][] map = new char[row][col];
            for (int i = 0; i < row; i++) {
                String tmp = scanner.next();
                for (int j = 0; j < col; j++) {
                    map[i][j] = tmp.charAt(j);
                    flag[i][j] = false;
                    if (map[i][j] == '@') {
                        m = i;
                        n = j;
                    }
                }
            }
            findBlack(map, m, n);
            System.out.println(ans);
        }
    }

    public static void findBlack(char[][] map, int m, int n) {
        if (m >= map.length || n >= map[0].length || m < 0 || n < 0 || map[m][n] == '#') {
            return;
        }
        if (flag[m][n]) {
            return;
        }
        ans++;
        //走过的设为true 后面不能再走
        flag[m][n] = true;
        findBlack(map, m + 1, n);
        findBlack(map, m, n + 1);
        findBlack(map, m, n - 1);
        findBlack(map, m - 1, n);
    }

    //牛客 蘑菇阵-动态dp

    //    走不同路径的概率是不相等的。
//    如   ：
//            1 2 3
//            4 5 6
//            1->2 概率是0.5，2->3概率是0.5，3->6概率是1
//    1->2 概率是0.5，2->5概率是0.5，5->6概率是1
//     1->4 概率是0.5，4->5概率是   1，3->6概率是1
//    可以发现1-2-3-6与1-2-5-6的概率为0.25，而1-4-5-6概率为0.5
//    所以直接用可达路径数/总路径数求概率是不对的。

    //超时 但是方向是对滴,需要改进为动态dp
    static int[][] map;
    static double count = 0;
    static int countMuShroom = 0;

    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int N = scanner.nextInt();
            int M = scanner.nextInt();
            int K = scanner.nextInt();
            map = new int[N][M];
            count = 0;
            countMuShroom = 0;
            for (int i = 0; i < K; i++) {
                int num1 = scanner.nextInt();
                int num2 = scanner.nextInt();
                map[num1 - 1][num2 - 1] = 1;
            }
            findRoad(map, 0, 0, 1);
            System.out.printf("%.2f\n", count);
        }
    }

    private static void findRoad(int[][] map, int m, int n, double flag) {
        if (m >= map.length || n >= map[0].length) {
            return;
        }
        if (m == map.length - 1 && n == map[0].length - 1) {
            count += flag;
            return;
        }
        if (map[m][n] == 1) {
            flag *= 0;
        }
        if (m == map.length - 1 || n == map[0].length - 1) {
            flag *= 1;
        } else {
            flag *= 0.5;
        }
        findRoad(map, m + 1, n, flag);
        findRoad(map, m, n + 1, flag);
    }


    public static void main(String[] args) {
        Scanner sca = new Scanner(System.in);
        while (sca.hasNext()) {
            int N = sca.nextInt();
            int M = sca.nextInt();
            int K = sca.nextInt();
            boolean[][] map = new boolean[N][M];
            for (int i = 0; i < K; i++) {
                int row = sca.nextInt();
                int col = sca.nextInt();
                map[row - 1][col - 1] = true;
            }
            double[][] probability = new double[N][M];
            probability[0][0] = 1;
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < M; j++) {
                    if (map[i][j]) {
                        probability[i][j] = 0;
                    }else if (i == 0 && j==0) {

                    }else {
                        probability[i][j] =(j-1<0?0:(i+1<N?probability[i][j-1]*0.5:probability[i][j-1]))+(i-1<0?0:(j+1<M?probability[i-1][j]*0.5:probability[i-1][j]));
                    }
                }
            }
            System.out.printf("%.2f",probability[N-1][M-1]);
        }
    }
}


